#include "ObjectHelper.h"
#include "Color.h"

class LightSource {
    vec3 position;
    Color lightColor;
    
    public:
        LightSource() {
            position = vec3();
            lightColor = Color();
        }
        
        LightSource(vector<string> input) {
            position = vec3();
        
            assert(input[0] == "light_source");
            
            istringstream(input[1]) >> position.x;
            istringstream(input[2]) >> position.y;
            istringstream(input[3]) >> position.z;
            
            assert(input[4] == "color");
            
            if (input[5] == "rgb") {
                lightColor = Color();
                istringstream(input[6]) >> lightColor.r;
                istringstream(input[7]) >> lightColor.g;
                istringstream(input[8]) >> lightColor.g;
            }
            else {
                cout << "Unknown modifier found for light_source: " << input[5] << endl;
                assert(0);
            }
        }
};

/*light_source
-100
100
100
color
rgb
1.5
1.5
1.5
*/
